package com.bdy.lm.taximanager.thread;

import com.bdy.lm.taximanager.app.MyApp;
import com.bdy.lm.taximanager.http.HttpJson;
        import com.bdy.lm.taximanager.model.MessagePackaging;
        import com.bdy.lm.taximanager.util.JsonUtils;

/**
 * Created by Administrator on 2016/8/14.
 */
public class HeartBitThread extends Thread {

    private MessagePackaging messagePackaging = new MessagePackaging(106);
    private HttpJson httpJson = new HttpJson();
    private String flag = "心跳线程";

    public void run() {
        while (MyApp.threadRun) {
            try {
                Thread.sleep(8000);
            } catch (InterruptedException e) {
            }
            //System.out.println("心跳" + jsonUtils.mapToJsonObject(messagePackaging.getHeartBitMessagePackageMap()));
            httpJson.HttpJsonPost(JsonUtils.mapToJsonObject(messagePackaging.getHeartBitMessagePackageMap()), MyApp.serverUrl);
            //Log.d(flag,"返回信息"+httpJson.getPostJson());
        }
    }

}

